home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / text / edit / vim60rt.lha / Vim / vim60 / syntax / muttrc.vim < prev    next >
Encoding:
Text File  |  2001-09-21  |  17.8 KB  |  300 lines

  1. " Vim syntax file
  2. " Language:    Mutt setup files
  3. " Maintainer:    Preben "Peppe" Guldberg <c928400@student.dtu.dk>
  4. " Last Change:    22nd Sep 2001
  5.  
  6. " This file covers mutt version 1.2.5i
  7.  
  8. " For version 5.x: Clear all syntax items
  9. " For version 6.x: Quit when a syntax file was already loaded
  10. if version < 600
  11.   syntax clear
  12. elseif exists("b:current_syntax")
  13.   finish
  14. endif
  15.  
  16. " Set the keyword characters
  17. if version < 600
  18.   set isk=@,48-57,_,-
  19. else
  20.   setlocal isk=@,48-57,_,-
  21. endif
  22.  
  23. syn match muttrcComment        "^#.*$"
  24. syn match muttrcComment        "[^\\]#.*$"lc=1
  25.  
  26. " Escape sequences (back-tick and pipe goes here too)
  27. syn match muttrcEscape        +\\[#tnr"'Cc]+
  28. syn match muttrcEscape        +[`|]+
  29.  
  30. " The variables takes the following arguments
  31. syn match  muttrcString        "=\s*[^ #"']\+"lc=1 contains=muttrcEscape
  32. syn region muttrcString        start=+"+ms=e skip=+\\"+ end=+"+ contains=muttrcEscape,muttrcSet,muttrcCommand
  33. syn region muttrcString        start=+'+ms=e skip=+\\'+ end=+'+ contains=muttrcEscape,muttrcSet,muttrcCommand
  34.  
  35. syn match muttrcSpecial        +\(['"]\)!\1+
  36.  
  37. " Numbers and Quadoptions may be surrounded by " or '
  38. syn match muttrcNumber        /=\s*\d\+/lc=1
  39. syn match muttrcNumber        /"=\s*\d\+"/lc=2
  40. syn match muttrcNumber        /'=\s*\d\+'/lc=2
  41. syn match muttrcQuadopt        +=\s*\(ask-\)\=\(yes\|no\)+lc=1
  42. syn match muttrcQuadopt        +"=\s*\(ask-\)\=\(yes\|no\)"+lc=2
  43. syn match muttrcQuadopt        +'=\s*\(ask-\)\=\(yes\|no\)'+lc=2
  44.  
  45. " Now catch some email addresses and headers (purified version from mail.vim)
  46. syn match muttrcEmail        "[a-zA-Z0-9._-]\+@[a-zA-Z0-9./-]\+"
  47. syn match muttrcHeader        "\<\(From\|To\|Cc\|Bcc\|Reply-To\|Subject\)\>:\="
  48. syn match muttrcHeader        "\<\(Return-Path\|Received\|Date\|Replied\|Attach\)\>:\="
  49.  
  50. syn match   muttrcKeySpecial    contained +\(\\[Cc'"]\|\^\|\\[01]\d\{2}\)+
  51. syn match   muttrcKey        contained "\S\+"            contains=muttrcKeySpecial
  52. syn region  muttrcKey        contained start=+"+ skip=+\\"+ end=+"+    contains=muttrcKeySpecial
  53. syn region  muttrcKey        contained start=+'+ skip=+\\'+ end=+'+    contains=muttrcKeySpecial
  54. syn match   muttrcKeyName    contained "\<f\(\d\|10\)\>"
  55. syn match   muttrcKeyName    contained "\\[trne]"
  56. syn match   muttrcKeyName    contained "\(<BackSpace>\|<Delete>\|<Down>\|<End>\|<Enter>\|<Esc>\)"
  57. syn match   muttrcKeyName    contained "\(<Home>\|<Insert>\|<Left>\|<PageDown>\|<PageUp>\)"
  58. syn match   muttrcKeyName    contained "\(<Return>\|<Right>\|<Space>\|<Tab>\|<Up>\)"
  59.  
  60. syn keyword muttrcVarBool    contained allow_8bit arrow_cursor ascii_chars askbcc askcc
  61. syn keyword muttrcVarBool    contained attach_split auto_tag autoedit beep beep_new
  62. syn keyword muttrcVarBool    contained bounce_delivered check_new collapse_unread confirmappend
  63. syn keyword muttrcVarBool    contained confirmcreate delete_untag edit_hdrs edit_headers
  64. syn keyword muttrcVarBool    contained encode_from envelope_from fast_reply fcc_attach
  65. syn keyword muttrcVarBool    contained fcc_clear followup_to force_name forw_decode
  66. syn keyword muttrcVarBool    contained forw_decrypt forw_quote forward_decode forward_decrypt
  67. syn keyword muttrcVarBool    contained forward_quote hdrs header help hidden_host
  68. syn keyword muttrcVarBool    contained ignore_list_reply_to imap_force_ssl imap_list_subscribed
  69. syn keyword muttrcVarBool    contained imap_passive imap_servernoise implicit_autoview
  70. syn keyword muttrcVarBool    contained mailcap_sanitize mark_old markers menu_scroll meta_key
  71. syn keyword muttrcVarBool    contained metoo mh_purge mime_forward_decode pager_stop
  72. syn keyword muttrcVarBool    contained pgp_autoencrypt pgp_autosign pgp_long_ids
  73. syn keyword muttrcVarBool    contained pgp_replyencrypt pgp_replysign pgp_replysignencrypted
  74. syn keyword muttrcVarBool    contained pgp_retainable_sigs pgp_show_unusable pgp_strict_enc
  75. syn keyword muttrcVarBool    contained pipe_decode pipe_split pop_delete pop_last print_decode
  76. syn keyword muttrcVarBool    contained prompt_after read_only reply_self resolve reverse_alias
  77. syn keyword muttrcVarBool    contained reverse_name reverse_realname rfc2047_parameters
  78. syn keyword muttrcVarBool    contained save_address save_empty save_name score sig_dashes
  79. syn keyword muttrcVarBool    contained smart_wrap sort_re ssl_use_sslv2 ssl_use_sslv3
  80. syn keyword muttrcVarBool    contained ssl_use_tlsv1 ssl_usesystemcerts status_on_top
  81. syn keyword muttrcVarBool    contained strict_threads suspend thorough_search tilde
  82. syn keyword muttrcVarBool    contained uncollapse_jump use_8bitmime use_domain use_from
  83. syn keyword muttrcVarBool    contained user_agent wait_key weed wrap_search write_bcc
  84.  
  85. syn keyword muttrcVarBool    contained noallow_8bit noarrow_cursor noascii_chars noaskbcc
  86. syn keyword muttrcVarBool    contained noaskcc noattach_split noauto_tag noautoedit nobeep
  87. syn keyword muttrcVarBool    contained nobeep_new nobounce_delivered nocheck_new
  88. syn keyword muttrcVarBool    contained nocollapse_unread noconfirmappend noconfirmcreate
  89. syn keyword muttrcVarBool    contained nodelete_untag noedit_hdrs noedit_headers noencode_from
  90. syn keyword muttrcVarBool    contained noenvelope_from nofast_reply nofcc_attach nofcc_clear
  91. syn keyword muttrcVarBool    contained nofollowup_to noforce_name noforw_decode noforw_decrypt
  92. syn keyword muttrcVarBool    contained noforw_quote noforward_decode noforward_decrypt
  93. syn keyword muttrcVarBool    contained noforward_quote nohdrs noheader nohelp nohidden_host
  94. syn keyword muttrcVarBool    contained noignore_list_reply_to noimap_force_ssl
  95. syn keyword muttrcVarBool    contained noimap_list_subscribed noimap_passive noimap_servernoise
  96. syn keyword muttrcVarBool    contained noimplicit_autoview nomailcap_sanitize nomark_old
  97. syn keyword muttrcVarBool    contained nomarkers nomenu_scroll nometa_key nometoo nomh_purge
  98. syn keyword muttrcVarBool    contained nomime_forward_decode nopager_stop nopgp_autoencrypt
  99. syn keyword muttrcVarBool    contained nopgp_autosign nopgp_long_ids nopgp_replyencrypt
  100. syn keyword muttrcVarBool    contained nopgp_replysign nopgp_replysignencrypted
  101. syn keyword muttrcVarBool    contained nopgp_retainable_sigs nopgp_show_unusable
  102. syn keyword muttrcVarBool    contained nopgp_strict_enc nopipe_decode nopipe_split nopop_delete
  103. syn keyword muttrcVarBool    contained nopop_last noprint_decode noprompt_after noread_only
  104. syn keyword muttrcVarBool    contained noreply_self noresolve noreverse_alias noreverse_name
  105. syn keyword muttrcVarBool    contained noreverse_realname norfc2047_parameters nosave_address
  106. syn keyword muttrcVarBool    contained nosave_empty nosave_name noscore nosig_dashes
  107. syn keyword muttrcVarBool    contained nosmart_wrap nosort_re nossl_use_sslv2 nossl_use_sslv3
  108. syn keyword muttrcVarBool    contained nossl_use_tlsv1 nossl_usesystemcerts nostatus_on_top
  109. syn keyword muttrcVarBool    contained nostrict_threads nosuspend nothorough_search notilde
  110. syn keyword muttrcVarBool    contained nouncollapse_jump nouse_8bitmime nouse_domain nouse_from
  111. syn keyword muttrcVarBool    contained nouser_agent nowait_key noweed nowrap_search nowrite_bcc
  112.  
  113. syn keyword muttrcVarBool    contained invallow_8bit invarrow_cursor invascii_chars invaskbcc
  114. syn keyword muttrcVarBool    contained invaskcc invattach_split invauto_tag invautoedit invbeep
  115. syn keyword muttrcVarBool    contained invbeep_new invbounce_delivered invcheck_new
  116. syn keyword muttrcVarBool    contained invcollapse_unread invconfirmappend invconfirmcreate
  117. syn keyword muttrcVarBool    contained invdelete_untag invedit_hdrs invedit_headers
  118. syn keyword muttrcVarBool    contained invencode_from invenvelope_from invfast_reply
  119. syn keyword muttrcVarBool    contained invfcc_attach invfcc_clear invfollowup_to invforce_name
  120. syn keyword muttrcVarBool    contained invforw_decode invforw_decrypt invforw_quote
  121. syn keyword muttrcVarBool    contained invforward_decode invforward_decrypt invforward_quote
  122. syn keyword muttrcVarBool    contained invhdrs invheader invhelp invhidden_host
  123. syn keyword muttrcVarBool    contained invignore_list_reply_to invimap_force_ssl
  124. syn keyword muttrcVarBool    contained invimap_list_subscribed invimap_passive
  125. syn keyword muttrcVarBool    contained invimap_servernoise invimplicit_autoview
  126. syn keyword muttrcVarBool    contained invmailcap_sanitize invmark_old invmarkers
  127. syn keyword muttrcVarBool    contained invmenu_scroll invmeta_key invmetoo invmh_purge
  128. syn keyword muttrcVarBool    contained invmime_forward_decode invpager_stop invpgp_autoencrypt
  129. syn keyword muttrcVarBool    contained invpgp_autosign invpgp_long_ids invpgp_replyencrypt
  130. syn keyword muttrcVarBool    contained invpgp_replysign invpgp_replysignencrypted
  131. syn keyword muttrcVarBool    contained invpgp_retainable_sigs invpgp_show_unusable
  132. syn keyword muttrcVarBool    contained invpgp_strict_enc invpipe_decode invpipe_split
  133. syn keyword muttrcVarBool    contained invpop_delete invpop_last invprint_decode
  134. syn keyword muttrcVarBool    contained invprompt_after invread_only invreply_self invresolve
  135. syn keyword muttrcVarBool    contained invreverse_alias invreverse_name invreverse_realname
  136. syn keyword muttrcVarBool    contained invrfc2047_parameters invsave_address invsave_empty
  137. syn keyword muttrcVarBool    contained invsave_name invscore invsig_dashes invsmart_wrap
  138. syn keyword muttrcVarBool    contained invsort_re invssl_use_sslv2 invssl_use_sslv3
  139. syn keyword muttrcVarBool    contained invssl_use_tlsv1 invssl_usesystemcerts invstatus_on_top
  140. syn keyword muttrcVarBool    contained invstrict_threads invsuspend invthorough_search invtilde
  141. syn keyword muttrcVarBool    contained invuncollapse_jump invuse_8bitmime invuse_domain
  142. syn keyword muttrcVarBool    contained invuse_from invuser_agent invwait_key invweed
  143. syn keyword muttrcVarBool    contained invwrap_search invwrite_bcc
  144.  
  145. syn keyword muttrcVarQuad    contained abort_nosubject abort_unmodified copy delete
  146. syn keyword muttrcVarQuad    contained honor_followup_to include mime_forward mime_forward_rest
  147. syn keyword muttrcVarQuad    contained mime_fwd move pgp_create_traditional pgp_verify_sig
  148. syn keyword muttrcVarQuad    contained postpone print quit recall reply_to
  149.  
  150. syn keyword muttrcVarQuad    contained noabort_nosubject noabort_unmodified nocopy nodelete
  151. syn keyword muttrcVarQuad    contained nohonor_followup_to noinclude nomime_forward
  152. syn keyword muttrcVarQuad    contained nomime_forward_rest nomime_fwd nomove
  153. syn keyword muttrcVarQuad    contained nopgp_create_traditional nopgp_verify_sig nopostpone
  154. syn keyword muttrcVarQuad    contained noprint noquit norecall noreply_to
  155.  
  156. syn keyword muttrcVarQuad    contained invabort_nosubject invabort_unmodified invcopy invdelete
  157. syn keyword muttrcVarQuad    contained invhonor_followup_to invinclude invmime_forward
  158. syn keyword muttrcVarQuad    contained invmime_forward_rest invmime_fwd invmove
  159. syn keyword muttrcVarQuad    contained invpgp_create_traditional invpgp_verify_sig invpostpone
  160. syn keyword muttrcVarQuad    contained invprint invquit invrecall invreply_to
  161.  
  162. syn keyword muttrcVarNum    contained history imap_checkinterval mail_check pager_context
  163. syn keyword muttrcVarNum    contained pager_index_lines pgp_timeout pop_port read_inc
  164. syn keyword muttrcVarNum    contained score_threshold_delete score_threshold_flag
  165. syn keyword muttrcVarNum    contained score_threshold_read sendmail_wait timeout write_inc
  166.  
  167. syn keyword muttrcVarStr    contained alias_file alias_format alternates attach_format
  168. syn keyword muttrcVarStr    contained attach_sep attribution certificate_file charset
  169. syn keyword muttrcVarStr    contained date_format default_hook dotlock_program dsn_notify
  170. syn keyword muttrcVarStr    contained dsn_return editor entropy_file escape folder
  171. syn keyword muttrcVarStr    contained folder_format forw_format forward_format from gecos_mask
  172. syn keyword muttrcVarStr    contained hdr_format hostname imap_cramkey imap_home_namespace
  173. syn keyword muttrcVarStr    contained imap_pass imap_preconnect imap_user in_reply_to
  174. syn keyword muttrcVarStr    contained indent_str indent_string index_format ispell locale
  175. syn keyword muttrcVarStr    contained mailcap_path mask mbox mbox_type message_format
  176. syn keyword muttrcVarStr    contained mix_entry_format mixmaster msg_format pager pager_format
  177. syn keyword muttrcVarStr    contained pgp_clearsign_command pgp_decode_command
  178. syn keyword muttrcVarStr    contained pgp_decrypt_command pgp_encrypt_only_command
  179. syn keyword muttrcVarStr    contained pgp_encrypt_sign_command pgp_entry_format
  180. syn keyword muttrcVarStr    contained pgp_export_command pgp_getkeys_command
  181. syn keyword muttrcVarStr    contained pgp_import_command pgp_list_pubring_command
  182. syn keyword muttrcVarStr    contained pgp_list_secring_command pgp_sign_as pgp_sign_command
  183. syn keyword muttrcVarStr    contained pgp_sign_micalg pgp_sort_keys pgp_verify_command
  184. syn keyword muttrcVarStr    contained pgp_verify_key_command pipe_sep pop_host pop_pass
  185. syn keyword muttrcVarStr    contained pop_user post_indent_str post_indent_string postponed
  186. syn keyword muttrcVarStr    contained print_cmd print_command query_command quote_regexp
  187. syn keyword muttrcVarStr    contained realname record reply_regexp send_charset sendmail shell
  188. syn keyword muttrcVarStr    contained signature simple_search smileys sort sort_alias sort_aux
  189. syn keyword muttrcVarStr    contained sort_browser spoolfile status_chars status_format tmpdir
  190. syn keyword muttrcVarStr    contained to_chars visual
  191.  
  192. syn keyword muttrcMenu        contained alias attach browser compose editor index pager postpone
  193. syn keyword muttrcMenu        contained pgp mix query generic
  194.  
  195. syn keyword muttrcCommand    auto_view alternative_order charset-hook uncolor exec
  196. syn keyword muttrcCommand    fcc-hook fcc-save-hook folder-hook hdr_order ignore
  197. syn keyword muttrcCommand    lists mailboxes mbox-hook my_hdr pgp-hook push reset
  198. syn keyword muttrcCommand    save-hook score send-hook source subscribe toggle
  199. syn keyword muttrcCommand    unalias unhdr_order unhook unignore unlists unmono
  200. syn keyword muttrcCommand    unmy_hdr unscore unsubscribe
  201.  
  202. syn keyword muttrcSet        set     skipwhite nextgroup=muttrcVar.*
  203. syn keyword muttrcUnset        unset   skipwhite nextgroup=muttrcVar.*
  204.  
  205. syn keyword muttrcBind        contained bind        skipwhite nextgroup=muttrcMenu
  206. syn match   muttrcBindLine    "^\s*bind\s\+\S\+"    skipwhite nextgroup=muttrcKey\(Name\)\= contains=muttrcBind
  207.  
  208. syn keyword muttrcMacro        contained macro        skipwhite nextgroup=muttrcMenu
  209. syn match   muttrcMacroLine    "^\s*macro\s\+\S\+"    skipwhite nextgroup=muttrcKey\(Name\)\= contains=muttrcMacro
  210.  
  211. syn keyword muttrcAlias        contained alias
  212. syn match   muttrcAliasLine    "^\s*alias\s\+\S\+" contains=muttrcAlias
  213.  
  214. " Colour definitions takes object, foreground and background arguments (regexps excluded).
  215. syn keyword muttrcColorField    contained attachment body bold error hdrdefault header index
  216. syn keyword muttrcColorField    contained indicator markers message normal quoted search signature
  217. syn keyword muttrcColorField    contained status tilde tree underline
  218. syn match   muttrcColorField    contained "\<quoted\d\=\>"
  219. syn keyword muttrcColorFG    contained black blue cyan default green magenta red white yellow
  220. syn keyword muttrcColorFG    contained brightblue brightcyan brightdefault brightgreen
  221. syn keyword muttrcColorFG    contained brightmagenta brightred brightwhite brightyellow
  222. syn match   muttrcColorFG    contained "\<\(bright\)\=color\d\{1,2}\>"
  223. syn keyword muttrcColorBG    contained black blue cyan default green magenta red white yellow
  224. syn match   muttrcColorBG    contained "\<color\d\{1,2}\>"
  225. " Now for the match
  226. syn keyword muttrcColor        contained color            skipwhite nextgroup=muttrcColorField
  227. syn match   muttrcColorInit    contained "^\s*color\s\+\S\+"    skipwhite nextgroup=muttrcColorFG contains=muttrcColor
  228. syn match   muttrcColorLine    "^\s*color\s\+\S\+\s\+\S"    skipwhite nextgroup=muttrcColorBG contains=muttrcColorInit
  229.  
  230. " Mono are almost like color (ojects inherited from color)
  231. syn keyword muttrcMonoAttrib    contained bold none normal reverse standout underline
  232. syn keyword muttrcMono        contained mono        skipwhite nextgroup=muttrcColorField
  233. syn match   muttrcMonoLine    "^\s*mono\s\+\S\+"    skipwhite nextgroup=muttrcMonoAttrib contains=muttrcMono
  234.  
  235. " obsolete
  236. syn keyword muttrcKeyName    contained backspace delete down end enter home insert left pagedown
  237. syn keyword muttrcKeyName    contained pageup return right up
  238. syn keyword muttrcVarBool    contained confirmfiles confirmfolders hold no_hdrs pgp_replypgp
  239. syn keyword muttrcVarBool    contained point_new noconfirmfiles noconfirmfolders nohold nono_hdrs
  240. syn keyword muttrcVarBool    contained nopgp_replypgp nopoint_new invconfirmfiles
  241. syn keyword muttrcVarBool    contained invconfirmfolders invhold invno_hdrs invpgp_replypgp
  242. syn keyword muttrcVarBool    contained invpoint_new attach_split edit_hdrs forw_decode forw_quote
  243. syn keyword muttrcVarBool    contained mime_fwd
  244. syn keyword muttrcVarNum    contained references
  245. syn keyword muttrcVarQuad    contained verify_sig
  246. syn keyword muttrcVarStr    contained local_sig local_site pgp pgp_pubring pgp_secring
  247. syn keyword muttrcVarStr    contained pgp_version remote_sig thread_chars url_regexp web_browser
  248. syn keyword muttrcVarStr    contained decode_format pgp_v3 pgp_v3_language pgp_v3_pubring
  249. syn keyword muttrcVarStr    contained pgp_v3_secring sendmail_bounce
  250. syn keyword muttrcMenu        contained url
  251. syn keyword muttrcCommand    alternates localsite unlocalsite
  252.  
  253. " Define the default highlighting.
  254. " For version 5.7 and earlier: only when not done already
  255. " For version 5.8 and later: only when an item doesn't have highlighting yet
  256. if version >= 508 || !exists("did_muttrc_syntax_inits")
  257.   if version < 508
  258.     let did_muttrc_syntax_inits = 1
  259.     command -nargs=+ HiLink hi link <args>
  260.   else
  261.     command -nargs=+ HiLink hi def link <args>
  262.   endif
  263.  
  264.   HiLink muttrcComment        Comment
  265.   HiLink muttrcEscape        SpecialChar
  266.   HiLink muttrcString        String
  267.   HiLink muttrcSpecial        Special
  268.   HiLink muttrcNumber        Number
  269.   HiLink muttrcQuadopt        Boolean
  270.   HiLink muttrcEmail        Special
  271.   HiLink muttrcHeader        Type
  272.   HiLink muttrcKeySpecial    SpecialChar
  273.   HiLink muttrcKey        Type
  274.   HiLink muttrcKeyName        Macro
  275.   HiLink muttrcVarBool        Identifier
  276.   HiLink muttrcVarQuad        Identifier
  277.   HiLink muttrcVarNum        Identifier
  278.   HiLink muttrcVarStr        Identifier
  279.   HiLink muttrcMenu        Identifier
  280.   HiLink muttrcCommand        Keyword
  281.   HiLink muttrcSet        muttrcCommand
  282.   HiLink muttrcUnset        muttrcCommand
  283.   HiLink muttrcBind        muttrcCommand
  284.   HiLink muttrcMacro        muttrcCommand
  285.   HiLink muttrcAlias        muttrcCommand
  286.   HiLink muttrcAliasLine    Identifier
  287.   HiLink muttrcColorField    Identifier
  288.   HiLink muttrcColorFG        String
  289.   HiLink muttrcColorBG        muttrcColorFG
  290.   HiLink muttrcColor        muttrcCommand
  291.   HiLink muttrcMonoAttrib    muttrcColorFG
  292.   HiLink muttrcMono        muttrcCommand
  293.  
  294.   delcommand HiLink
  295. endif
  296.  
  297. let b:current_syntax = "muttrc"
  298.  
  299. "EOF    vim: ts=8 noet tw=100 sw=8 sts=0
  300.